
if has('termguicolors')
  set termguicolors
endif

let g:sonokai_style = 'maia'
let g:sonokai_better_performance = 1

" colorscheme sonokai

" Set contrast.
" This configuration option should be placed before `colorscheme everforest`.
" Available values: 'hard', 'medium'(default), 'soft'
let g:everforest_background = 'hard'
" For better performance
let g:everforest_better_performance = 1
colorscheme everforest
" let g:lightline = {'colorscheme' : 'everforest'}

" let g:lightline = {'colorscheme' : 'sonokai'}
" let g:lightline = {'colorscheme' : 'alduin'}

let g:airline_theme = 'everforest'
let g:lightline = {'colorscheme' : 'everforest'}

" colorscheme gruvbox
" colorscheme default
" colorscheme everforest
" colorscheme PaperColor
" colorscheme solarized
" colorscheme tokyonight
" colorscheme default
set wrap
"Vundle
set nocompatible              " be iMproved, required
" filetype on                  " required
filetype plugin indent on
filetype plugin on




setlocal omnifunc=javacomplete#Complete
setlocal completefunc=javacomplete#CompleteParamsInfo
if has("autocmd")
    autocmd Filetype java setlocal omnifunc=javacomplete#Complete
endif
inoremap <buffer> <C-X><C-U> <C-X><C-U><C-P>
inoremap <buffer> <C-S-Space> <C-X><C-U><C-P>


set scrolloff=5

let mapleader =' '

" set tags=tags;,~/src/groovy_src/tags,~/src/jdk11_src/tags
set tags=tags
" autocmd BufRead,BufNewFile *.py set tags+=/usr/lib/python3.10/tags,/home/xiao/.local/lib/python3.10/site-packages/tags

let g:header_field_author = 'xiaogebin'
let g:header_field_author_email = '565127608@qq.com'
let g:header_field_filename = 0

let g:AutoPairs = {'(':')', '{':'}', '[':']', "'":"'",'"':'"'}
let g:formatters_go = ['gofumpt']

let NERDTreeShowBookmarks=1
let NERDTreeIgnore=['\.py[cd]$', '\~$', '\.swo$', '\.swp$', '^\.git$', '^\.hg$', '^\.svn$', '\.bzr$']
let NERDTreeChDirMode=0
let NERDTreeQuitOnOpen=1
let NERDTreeMouseMode=2
let NERDTreeShowHidden=1
let NERDTreeKeepTreeInNewTab=1
let g:nerdtree_tabs_open_on_gui_startup=0

let g:coc_global_extensions = [
            \ 'coc-snippets',
            \ 'coc-tsserver',
            \ 'coc-eslint',
            \ 'coc-pyright',
            \ 'coc-sh',
            \ 'coc-html',
            \ 'coc-css',
            \ 'coc-vimlsp',
            \ 'coc-groovy',
            \ 'coc-java',
            \ 'coc-cmake',
            \ 'coc-clangd',
            \ 'coc-yank',
            \ 'coc-actions',
            \ 'coc-go',
            \ 'coc-vimlsp',
            \ 'coc-lua',
            \ 'coc-prettier',
            \ 'coc-db'
            \ ]

set hidden
" Some servers have issues with backup files, see #649
set nobackup
set nowritebackup
" Better display for messages
set cmdheight=1
" You will have bad experience for diagnostic messages when it's default 4000.
set updatetime=300
" don't give |ins-completion-menu| messages.
set shortmess+=c
" always show signcolumns
set signcolumn=yes

let g:nightflyCursorColor = v:true

let g:fzf_action = {
            \ 'ctrl-t': 'tab split',
            \ 'ctrl-s': 'split',
            \ 'ctrl-v': 'vsplit'
            \ }
let $FZF_DEFAULT_COMMAND = 'ag -g ""'

set laststatus=2
let g:airline_left_sep = ''
let g:airline_left_alt_sep = ''
let g:airline_right_sep = ''
let g:airline_right_alt_sep = ''
let g:airline_symbols = {}
let g:airline_symbols.branch = ''
let g:airline_symbols.readonly = ''
let g:airline_symbols.linenr = '☰'
let g:airline_symbols.maxlinenr = ''
let g:airline_symbols.dirty='⚡'
" let g:airline_theme = 'onedark'
" let g:airline_theme = 'one'
let g:airline#extensions#tabline#enabled=1
let g:airline_powerline_fonts=1

" DelemitMate
" Plug 'Raimondi/delimitMate'
" let delimitMate_expand_cr = 1
" let delimitMate_expand_space = 1

" Color
set t_Co=256
syntax on
" set background=dark
" colorscheme onedark
" colorscheme PerfectDark
" colorscheme molokai_dark
let g:one_allow_italics = 1
" colorscheme one
" colorscheme dracula
" colorscheme codedark
" colorscheme nightfly
" let g:lightline = { 'colorscheme': 'nightfly' }
let g:lightline = { 'colorscheme': 'molokai_dark' }
" let g:airline_theme='papercolor'
" let g:lightline = { 'colorscheme': 'PaperColor' }
"
" Line Numbers
set relativenumber
set number


" Indentation
set tabstop=4
set expandtab
set shiftwidth=4
set autoindent
set smarttab
set ignorecase
set smartcase

" Vim can highlight whitespaces for you in a convenient way:
set list
set listchars=tab:>_,trail:.,extends:#,nbsp:.

" Nav to the lastly used tab
let g:lasttab = 1

" Allows for mouse scrolling
set mouse=a

" Highlight Current Line
set cursorline
highlight NERDTreeFile ctermfg=14

" Highlight All Search Pattern
set hlsearch

" Swp file handling
set backupdir=~/.vim/backup//
set viewoptions-=curdir
syntax on

" hi Normal ctermfg=lightgreen
" set autochdir

" set clipboard=unnamedplus

set linebreak


" Clipboard
set clipboard=unnamed
" JSX
let g:jsx_ext_required = 0
let g:user_emmet_settings = {
            \  'javascript' : {
            \      'extends' : 'jsx',
            \  },
            \}


let g:gitgutter_map_keys = 0

" let g:autoformat_verbosemode=1
" let g:autoformat_autoindent = 1
" let g:autoformat_retab = 1
" let g:autoformat_remove_trailing_spaces = 1
"
let g:html_indent_style1 = "inc"
let g:html_indent_inctags = "body,html,head,p,tbody"
let g:html_indent_autotags = "br,input,img,script"


let g:db_ui_auto_execute_table_helper=1

let g:autoHEADER_default_author = "xiaogebin"
let g:autoHEADER_default_author_email = "565127608@qq.com"
" set conceallevel=0
let g:vim_json_syntax_conceal = 1

let g:fzf_layout = { 'down': '~40%' }

set foldmethod=marker

let g:solarized_termtrans = 1

" let g:deoplete#enable_at_startup = 1


" set guicursor=n-v-c:block,i-ci-ve:ver25,r-cr:hor20,o:hor50
"   \,a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor
"   \,sm:block-blinkwait175-blinkoff150-blinkon175
set jumpoptions="stack"

autocmd BufEnter * :syntax sync minlines=200 maxlines=500
autocmd FileType groovy setlocal shiftwidth=4 tabstop=4
